package SellCar.dao.news.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;

import SellCar.dao.news.NewsMapper;
import SellCar.pojo.News;
@Repository("newsMapperImpl")
public class NewsMapperImpl implements NewsMapper{
	@Autowired
	@Qualifier("sqlSessionTemplate")
	private SqlSessionTemplate sqlSessionTemplate;
	public SqlSessionTemplate getSqlSessionTemplate() {
		return sqlSessionTemplate;
	}
	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
		this.sqlSessionTemplate = sqlSessionTemplate;
	}

	
	public List<News> getNewslist() {
		
		return sqlSessionTemplate.getMapper(NewsMapper.class).getNewslist();
	}

}
